﻿
@{
    ViewBag.Title = "PerformanceMonthAdd";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link rel="stylesheet" href="~/assets/portal/assets/css/common.css" />
    <link rel="stylesheet" href="~/bussiness/js/base/reset.css" />
    <link rel="stylesheet" href="~/bussiness/js/pg/Performance/edit.css" />
    <style>

        #editor—wrapper {
            /*max-width: 90%;*/
            width: 1200px !important;
            border: 1px solid #ccc;
            z-index: 100; /*  按需定义 */
        }

        .title {
            font-weight: bolder;
        }

        #toolbar-container {
            border-bottom: 1px solid #ccc;
        }

        #editor-container {
            min-height: 310px;
            margin-bottom: 200px;
        }

            #editor-container .title::before {
                content: ""
            }

        .ant-select-arrow, .ant-select-clear {
            position: absolute;
            right: 10px;
        }

        .stitle {
            font-size: 16px;
            font-weight: 600;
            color: #424758;
            display: flex;
            align-items: center;
        }

            .stitle::before {
                content: "";
                margin-right: 10px;
                display: inline-block;
                width: 4px;
                height: 18px;
                background: #0064E5;
            }

        .stable {
            border-collapse: collapse; /* 折叠边框，使之变为单一线划分 */
            border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
            width: 100%;
            max-height: 800px;
            overflow-y: scroll;
        }

            .stable th {
                background: #f2f6f9;
                font-size: 14px;
                font-weight: 600;
            }

            .stable th, .stable td {
                border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
                text-align: center;
                height: 48px;
            }
    </style>
}
<div id="PerformanceMonthADD" class="font-['SourceHanSansSC']">
    <a-style-provider hash-priority="high">
        <a-config-provider :locale="vlocale">
            <header class="px-5 box-border">
                <div class="flex items-center">
                    <div class="w-full h-[48px] text-[13px]  rounded-lg mx-auto my-[10px]  bg-white  text-[#888888] text-3xl flex items-center px-10">   <div class="w-22 h-22 bg-blue-200 mr-5"> <img class="w-full h-full cursor-pointer" v-on:click="PerformanceMonthADDParams.vvback()" src="~/Assets/nimgs/exit.png" alt="返回" /></div> <span class="text-[]">履职考核<span class="mx-2">/</span><span class="text-[#424758] text-[15px]">月度考核</span> </span>  </div>
                </div>
                <m-image-model></m-image-model>
                <m-pdf-pop-model></m-pdf-pop-model>
                <a-card :bordered="true" class="w-full  mt-12">
                    <template #title>
                        <div class="w-full flex justify-between items-center;">
                            <div class="flex items-center"> <div>月度考核</div> <div class="ml-7"></div></div>
                        </div>
                    </template>
                    <a-spin :spinning="PerformanceMonthADDParams.uploadLock.value" tip="加载中，请耐心等待..." />
                    <div class="stitle" style="margin:20px 0">基本信息</div>
                    <a-form style="margin-top:0px"
                            layout="inline"
                            :model="PerformanceMonthADDParams.formData.value">

                        <a-form-item label="部门：">

                            <a-select show-search
                                      allow-clear
                                      style="width: 200px;"
                                      :filter-option="PerformanceMonthADDParams.filterOption"
                                      placeholder="请选择所在部门"
                                      :disabled="PerformanceMonthADDParams.urlinfo.value.type==9"
                                      v-model:value="PerformanceMonthADDParams.formData.value.DepartmentId"
                                      :options="PerformanceMonthADDParams.deptList.value">
                            </a-select>



                        </a-form-item>

                        <a-form-item label="年份：">
                            <a-select show-search
                                      style="width: 200px"
                                      :disabled="PerformanceMonthADDParams.urlinfo.value.type==9"
                                      :filter-option="PerformanceMonthADDParams.filterOption"
                                      v-model:value="PerformanceMonthADDParams.formData.value.Years"
                                      :options="PerformanceMonthADDParams.yearsList.value">

                            </a-select>
                        </a-form-item>


                        <a-form-item label="月份：">
                            <a-select show-search
                                      style="width: 200px"
                                      :filter-option="PerformanceMonthADDParams.filterOption"
                                      :disabled="PerformanceMonthADDParams.urlinfo.value.type==9"
                                      v-model:value="PerformanceMonthADDParams.formData.value.Months"
                                      :options="PerformanceMonthADDParams.monthList.value">

                            </a-select>
                        </a-form-item>

                        <a-form-item label="分值：">
                            <a-input disabled v-model:value="PerformanceMonthADDParams.formData.value.TotalScore" style="width: 200px" />
                        </a-form-item>


                    </a-form>
                    <div id="tableContainer"></div>

                    <div class="stitle" style="margin:20px 0">扣分详情</div>

                    <table class="stable">
                        <tr>
                            <th>序号</th>
                            <th>应用模块</th>
                            <th>考评扣分</th>
                            <th>扣分缘由</th>
                            <th v-if="PerformanceMonthADDParams.urlinfo.value.type&&PerformanceMonthADDParams.userinfo.value.DepartmentId==20">考评人</th>

                        </tr>
                        <tr v-for="(e,i) in PerformanceMonthADDParams.settingList.value" :key="i">
                            <td>
                                {{i+1}}
                            </td>
                            <td>
                                {{e.CheckContent}}
                            </td>
                            <td>
                                <a-input-number :disabled="PerformanceMonthADDParams.urlinfo.value.type==9" v-on:change="($event)=>PerformanceMonthADDParams.nchange($event,e)" style="max-width: 96%; min-width: 50%" v-model:value="e.ItemScore" :min="0" />

                            </td>
                            <td>
                                <a-input :disabled="PerformanceMonthADDParams.urlinfo.value.type==9" v-on:input="PerformanceMonthADDParams.throttledUpdate(e)" style="max-width: 96%; min-width: 50%" v-model:value="e.Remark">
                                </a-input>
                            </td>
                            <td v-if="PerformanceMonthADDParams.urlinfo.value.type&&PerformanceMonthADDParams.userinfo.value.DepartmentId==20">
                                {{e.UpdateUserName}}
                            </td>

                        </tr>
                    </table>

                    @*</a-card>*@
                    <a-form-item label-align="right" style="margin-top:20px" label="备注：">
                        <a-textarea style="width:600px" :disabled="PerformanceMonthADDParams.urlinfo.value.type==9" v-model:value="PerformanceMonthADDParams.formData.value.Remark">
                        </a-textarea>
                    </a-form-item>
                    <div class="w-full h-[56px] items-center flex justify-end">
                        <div class="mr-[70px] text-[16px] font-weight-bold flex items-center">总分：<span style="font-size: 25px; font-weight: bold; color: #FF5E13; ">{{ PerformanceMonthADDParams.formData.value.TotalScore}}</span><div style="margin-left:6px"> 分</div></div>
                    </div>
                    <div class="stitle" style="margin-bottom:10px">附件</div>

                    <div  style="margin-top:10px">
                        <a-upload v-model:file-list="PerformanceMonthADDParams.uploadImg.value.fileList"
                                  action="#"
                                  multiple
                                  :item-render="($event)=> PerformanceMonthADDParams.itemRender($event)"
                                  v-on:change="PerformanceMonthADDParams.handleChange($event)">
                            <a-button v-if="PerformanceMonthADDParams.uploadImg.value.fileList.length < 8 && PerformanceMonthADDParams.urlinfo.value.type!=9" type="primary">+ 上传附件</a-button>
                        </a-upload>
                    </div>
                 

                </a-card>

            </header>
            <m-bottom-btns></m-bottom-btns>
        </a-config-provider>
    </a-style-provider>
</div>
@section Js{
    <script src="~/bussiness/js/base/tailwind.js"></script>

    <script type="module">
        import Composition from '../../bussiness/js/pg/Performance/PerformanceMonthAdd.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")'
        import localeValues from '../../Bussiness/js/base/es/locale/zh_CN.js'
        singalApp('PerformanceMonthADD', Composition, localeValues)
    </script>
}
